Skip to content

Update .NET Targets and Fix warnings#2340

Open
normj wants to merge 29 commits intofeature/response-streamingfrom
normj/update-targets
Open

Update .NET Targets and Fix warnings#2340
normj wants to merge 29 commits intofeature/response-streamingfrom
normj/update-targets

Conversation

@normj
Copy link
Copy Markdown
Member

@normj normj commented Apr 22, 2026

Description of changes:
The main driver was I wanted to drop out of support targets in Amazon.Lambda.RuntimeSupport which allows me to clean up the code and remove all for #if code branches. I decided since I was cleaning the targets I would also fix all of the compiler warnings. This spiraled into fixing up warnings in all of the other packages and remove out of support targets like .NET Core 3.1 and .NET 6 in them.

The PR contains a lot of files but most files just include deleted code for the removed targets.

Changes

  • Defined msbuild parameter DefaultPackageTargets in the common.props used to configure the default .NET targets to build for. The value is net8.0;net10.0.
  • Update all the event packages that had a mismatch of targets be used to DefaultPackageTargets
  • Removed the #if that were no longer needed because the .NET targets were raised
  • Amazon.Lambda.Annotations and Amazon.Lambda.RuntimeSupport do not use DefaultPackageTargets because adding new targets requires more work then just changing the value for this projects. I don't want anybody to think by changing DefaultPackageTargets that will automatically fix up those libraries
  • In Amazon.Lambda.RuntimeSupport I was able to delete a lot of old code since we lowest supported target is now .NET 8.
  • Addressed all compiler warnings and enabled treat warnings as errors in the common.props.
  • The change in build targets caused a lot of instability with the unit tests particular with the GitHub action and the Annotation source generator. So had to do a fair amount of hardening up those tests.
  • All the packages are getting a major version bump because of the build target changes.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

normj added 3 commits April 20, 2026 16:30
…AspNetCoreServer and Amazon.Lambda.AspNetCoreServer.Hosting to .NET 8 and 10 dropping older targets
@normj normj requested a review from a team as a code owner April 22, 2026 01:06
@normj normj marked this pull request as draft April 22, 2026 01:06
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates supported .NET target frameworks across the repo (dropping out-of-support TFMs), simplifies code by removing now-unnecessary conditional compilation, and hardens/updates tests and templates accordingly.

Changes:

  • Introduces DefaultPackageTargets (net8.0;net10.0) and migrates many libraries to use it.
  • Removes #if branches tied to dropped TFMs and updates serializers/logging/streaming code for the new baseline.
  • Updates unit/integration tests, sample templates, and dependencies to align with updated TFMs/runtimes.

Reviewed changes

Copilot reviewed 286 out of 290 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
buildtools/common.props Adds default package TFMs and compiler warning configuration.
Tools/LambdaTestTool-v2/tests/Amazon.Lambda.TestTool.UnitTests/PackagingTests.cs Updates expected packaged TFMs for runtime support content.
Libraries/test/TestWebApp/serverless.template Updates sample runtime setting.
Libraries/test/TestWebApp/TestWebApp.csproj Removes TFM-conditional package reference tied to dropped target.
Libraries/test/TestWebApp/Program.cs Adds pragma suppression around deprecated ASP.NET hosting APIs.
Libraries/test/TestWebApp/HttpApiV2LambdaFunction.cs Removes conditional compilation around SnapStart warmup request hook.
Libraries/test/TestWebApp/Controllers/TraceTestsController.cs Minor code cleanup (this. removal).
Libraries/test/TestWebApp/Controllers/ResourcePathController.cs Minor code cleanup (this. removal).
Libraries/test/TestWebApp/Controllers/RequestServicesExampleController.cs Minor code cleanup (this. removal).
Libraries/test/TestWebApp/Controllers/RedirectTestController.cs Minor code cleanup (this. removal).
Libraries/test/TestWebApp/Controllers/RawQueryStringController.cs Minor code cleanup (this. removal).
Libraries/test/TestWebApp/Controllers/BinaryContentController.cs Minor code cleanup (this. removal).
Libraries/test/TestServerlessApp/aws-lambda-tools-defaults.json Updates framework and normalizes bucket/stack defaults.
Libraries/test/TestServerlessApp/TestServerlessApp.csproj Updates target framework and dependency versions; suppresses nullable warnings.
Libraries/test/TestServerlessApp/SimpleCalculator.cs Minor code cleanup (this. removal).
Libraries/test/TestServerlessApp/NullableReferenceTypeExample.cs Removes BOM/formatting cleanup.
Libraries/test/TestServerlessApp/Dockerfile Updates base Lambda .NET image tag.
Libraries/test/TestServerlessApp.IntegrationTests/TestServerlessApp.IntegrationTests.csproj Updates TFM and test/dependency package versions.
Libraries/test/TestServerlessApp.IntegrationTests/Greeter.cs Fixes sync-over-async usage.
Libraries/test/TestServerlessApp.ALB/serverless.template Updates runtime settings for ALB integration test template.
Libraries/test/TestServerlessApp.ALB/TestServerlessApp.ALB.csproj Updates target framework.
Libraries/test/TestServerlessApp.ALB.IntegrationTests/TestServerlessApp.ALB.IntegrationTests.csproj Updates TFM and test/dependency package versions.
Libraries/test/TestFunctionFSharp/TestFunctionFSharp/TestFunctionFSharp.fsproj Removes explicit FSharp.Core reference.
Libraries/test/TestFunctionFSharp/FSharpJsonSerializer/FSharpJsonSerializer.csproj Moves from netstandard2.0 to multi-target net8/net10.
Libraries/test/TestFunction/TestFunction.csproj Updates target framework.
Libraries/test/TestExecutableServerlessApp/TestExecutableServerlessApp.csproj Updates target framework and DI dependency version.
Libraries/test/TestExecutableServerlessApp/NullableReferenceTypeExample.cs Adjusts nullable signature to match updated expectations.
Libraries/test/TestCustomAuthorizerApp/TestCustomAuthorizerApp.csproj Updates target framework.
Libraries/test/TestCustomAuthorizerApp.IntegrationTests/TestCustomAuthorizerApp.IntegrationTests.csproj Multi-targets net8/net10 and updates test/dependency versions.
Libraries/test/TestCustomAuthorizerApp.IntegrationTests/NonStringAuthorizerTests.cs Applies null-forgiving after explicit null assertions.
Libraries/test/TestCustomAuthorizerApp.IntegrationTests/IntegrationTestContextFixtureCollection.cs Disables parallelization for integration test collection.
Libraries/test/SnapshotRestore.Registry.Tests/SnapshotRestore.Registry.Tests.csproj Updates test package versions.
Libraries/test/PowerShellTests/ScriptInvokeTests.cs Updates conditional compilation baseline.
Libraries/test/PowerShellTests/PowerShellTests.csproj Updates test package versions.
Libraries/test/PowerShellTests/ExceptionHandlingTests.cs Replaces string-suffix assertion with Assert.EndsWith.
Libraries/test/IntegrationTests.Helpers/LambdaHelper.cs Adds throttling handling when polling Lambda state.
Libraries/test/IntegrationTests.Helpers/IntegrationTests.Helpers.csproj Updates target framework and AWS SDK package versions.
Libraries/test/IntegrationTests.Helpers/CloudFormationHelper.cs Changes stack status fallback behavior when stack not found.
Libraries/test/EventsTests.Shared/DynamoDBEventJsonTests.cs Updates assertions to more idiomatic xUnit patterns.
Libraries/test/EventsTests.NET8/TestResponseCasing.cs Fixes namespace to match project.
Libraries/test/EventsTests.NET8/EventsTests.NET8.csproj Removes linked test file tied to dropped target.
Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/CustomRuntimeFunctionTest/aws-lambda-tools-defaults.json Updates provided runtime to provided.al2023 and formatting.
Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/CustomRuntimeFunctionTest/CustomRuntimeFunctionTest.csproj Updates TFM, NUnit versions, and globalization settings.
Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/CustomRuntimeAspNetCoreMinimalApiTest/aws-lambda-tools-defaults.json Updates provided runtime to provided.al2023 and formatting.
Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/CustomRuntimeAspNetCoreMinimalApiTest/CustomRuntimeAspNetCoreMinimalApiTest.csproj Updates TFM, Swashbuckle version, and globalization settings.
Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/CustomRuntimeAspNetCoreMinimalApiTest/Controllers/LoggerTestController.cs Minor code cleanup (this. removal).
Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/CustomRuntimeAspNetCoreMinimalApiCustomSerializerTest/aws-lambda-tools-defaults.json Updates provided runtime to provided.al2023.
Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/CustomRuntimeAspNetCoreMinimalApiCustomSerializerTest/CustomRuntimeAspNetCoreMinimalApiCustomSerializerTest.csproj Updates TFM, Swashbuckle version, and globalization settings.
Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/CustomRuntimeAspNetCoreMinimalApiCustomSerializerTest/Controllers/LoggerTestController.cs Minor code cleanup (this. removal).
Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.UnitTests/TestHelpers/TestStreamingRuntimeApiClient.cs Updates logger writer usage and removes now-unneeded #if blocks.
Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.UnitTests/TestHelpers/TestRuntimeApiClient.cs Updates logger writer usage.
Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.UnitTests/TestHelpers/TestMultiConcurrencyRuntimeApiClient.cs Updates logger writer usage.
Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.UnitTests/TestHelpers/NoOpInternalRuntimeApiClient.cs Removes #if around restore APIs.
Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.UnitTests/SnapstartTests.cs Fixes async test signatures and readonly fields.
Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.UnitTests/RuntimeApiClientTests.cs Removes #if around argument validation tests.
Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.UnitTests/RawStreamingHttpClientTests.cs Removes #if wrapper.
Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.UnitTests/NativeAOTTests.cs Removes #if wrapper.
Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.UnitTests/LogMessageFormatterTests.cs Uses Assert.Single.
Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.UnitTests/LambdaResponseStreamingCoreTests.cs Removes #if wrapper.
Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.UnitTests/LambdaContextTests.cs Updates logger writer usage.
Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.UnitTests/HandlerWrapperTests.cs Updates logger writer usage.
Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.UnitTests/Common.cs Uses Assert.Fail instead of Assert.True(false, ...).
Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.UnitTests/Amazon.Lambda.RuntimeSupport.UnitTests.csproj Updates test package versions.
Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.IntegrationTests/ResponseStreamingTests.cs Passes explicit runtime for resource preparation.
Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.IntegrationTests/CustomRuntimeAspNetCoreMinimalApiTest.cs Updates expected build output path and runtime resource preparation.
Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.IntegrationTests/CustomRuntimeAspNetCoreMinimalApiCustomSerializerTest.cs Updates expected build output path and runtime resource preparation.
Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.IntegrationTests/ApiGatewayStreamingTests.cs Adds integration test collection annotation.
Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.IntegrationTests/Amazon.Lambda.RuntimeSupport.IntegrationTests.csproj Updates AWS SDK and test package versions.
Libraries/test/Amazon.Lambda.Logging.AspNetCore.Tests/LoggingTests.cs Makes static path field readonly; removes unused logger scenario.
Libraries/test/Amazon.Lambda.Logging.AspNetCore.Tests/Amazon.Lambda.Logging.AspNetCore.Tests.csproj Multi-targets tests and updates dependency/test packages.
Libraries/test/Amazon.Lambda.DynamoDBEvents.SDK.Convertor.Tests/DynamodbStreamRecordConvertorTests.cs Fixes nullable annotations.
Libraries/test/Amazon.Lambda.DynamoDBEvents.SDK.Convertor.Tests/DynamodbIdentityConvertorTests.cs Fixes nullable annotations.
Libraries/test/Amazon.Lambda.DynamoDBEvents.SDK.Convertor.Tests/Amazon.Lambda.DynamoDBEvents.SDK.Convertor.Tests.csproj Updates test package versions and runner configuration.
Libraries/test/Amazon.Lambda.Core.Tests/Amazon.Lambda.Core.Tests.csproj Updates test/AWS SDK package versions and runner config.
Libraries/test/Amazon.Lambda.AspNetCoreServer.Test/StreamingFunctionHandlerAsyncTests.cs Minor code cleanup (this. removal).
Libraries/test/Amazon.Lambda.AspNetCoreServer.Test/Amazon.Lambda.AspNetCoreServer.Test.csproj Updates test dependencies and NoWarn list.
Libraries/test/Amazon.Lambda.AspNetCoreServer.Hosting.Tests/HostingOptionsTests.cs Uses null-forgiving operator to satisfy nullable analysis.
Libraries/test/Amazon.Lambda.AspNetCoreServer.Hosting.Tests/Amazon.Lambda.AspNetCoreServer.Hosting.Tests.csproj Multi-targets and updates test dependencies/NoWarn list.
Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/Snapshots/ServerlessTemplates/sqsEvents.template Snapshot updates for property ordering/content.
Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/Snapshots/ServerlessTemplates/snsEvents.template Snapshot updates for property ordering/content.
Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/Snapshots/ServerlessTemplates/hostbuild.serverless.template Updates runtime in snapshot template.
Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/Snapshots/ServerlessTemplates/dynamoDBEvents.template Snapshot updates for property ordering/content.
Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/Snapshots/ServerlessTemplates/albEvents.template Updates runtime and snapshot property ordering.
Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/Snapshots/ProtectedFunction_GetIHttpResult_Generated.g.cs Snapshot updates for updated #if baseline.
Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/Snapshots/IAuthorizerResultExample_SimpleRestApiAuthorizer_Generated.g.cs Snapshot updates for updated #if baseline.
Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/Snapshots/IAuthorizerResultExample_SimpleHttpApiAuthorizer_Generated.g.cs Snapshot updates for updated #if baseline.
Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/Snapshots/CustomAuthorizerWithIHttpResultsExample_AuthorizerWithIHttpResults_Generated.g.cs Snapshot updates for updated #if baseline.
Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/Snapshots/CustomAuthorizerRestExample_RestAuthorizer_Generated.g.cs Snapshot updates (BOM removal + updated #if baseline).
Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/Snapshots/CustomAuthorizerHttpApiV1Example_HttpApiV1Authorizer_Generated.g.cs Snapshot updates for updated #if baseline.
Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/Snapshots/CustomAuthorizerHttpApiExample_HttpApiAuthorizer_Generated.g.cs Snapshot updates (BOM removal + updated #if baseline).
Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/Snapshots/AuthorizerFunction_SimpleRestApiAuthorize_Generated.g.cs Snapshot updates for updated #if baseline.
Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/Snapshots/AuthorizerFunction_SimpleHttpApiAuthorize_Generated.g.cs Snapshot updates for updated #if baseline.
Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/Snapshots/AuthNameFallback_GetUserId_Generated.g.cs Snapshot updates for updated #if baseline.
Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/CloudFormationTemplateHandlerTests/FindTemplateTests.cs Updates expected framework string in tests.
Libraries/src/SnapshotRestore.Registry/RestoreHooksRegistry.cs Makes registries/logger readonly.
Libraries/src/Amazon.Lambda.TestUtilities/Amazon.Lambda.TestUtilities.csproj Uses DefaultPackageTargets.
Libraries/src/Amazon.Lambda.SimpleEmailEvents/Amazon.Lambda.SimpleEmailEvents.csproj Uses DefaultPackageTargets.
Libraries/src/Amazon.Lambda.SimpleEmailEvents/Actions/IReceiptAction.cs Adds XML docs and formatting cleanup.
Libraries/src/Amazon.Lambda.Serialization.SystemTextJson/SourceGeneratorLambdaJsonSerializer.cs Drops obsolete #if wrappers and simplifies option usage.
Libraries/src/Amazon.Lambda.Serialization.SystemTextJson/LambdaJsonSerializer.cs Removes conditional attribute compilation and minor cleanup.
Libraries/src/Amazon.Lambda.Serialization.SystemTextJson/DefaultLambdaJsonSerializer.cs Removes conditional attribute compilation and minor cleanup.
Libraries/src/Amazon.Lambda.Serialization.SystemTextJson/Converters/ConstantClassConverter.cs Removes conditional attribute compilation.
Libraries/src/Amazon.Lambda.Serialization.SystemTextJson/CamelCaseLambdaJsonSerializer.cs Removes conditional attribute compilation and minor cleanup.
Libraries/src/Amazon.Lambda.Serialization.SystemTextJson/Amazon.Lambda.Serialization.SystemTextJson.csproj Uses DefaultPackageTargets.
Libraries/src/Amazon.Lambda.Serialization.SystemTextJson/AbstractLambdaJsonSerializer.cs Removes old-TFM JSON ignore branch and minor cleanup.
Libraries/src/Amazon.Lambda.Serialization.Json/JsonSerializer.cs Minor cleanup (this. removal).
Libraries/src/Amazon.Lambda.Serialization.Json/AwsResolver.cs Updates Json.NET API usage (Converter instead of deprecated member).
Libraries/src/Amazon.Lambda.Serialization.Json/Amazon.Lambda.Serialization.Json.csproj Moves from netstandard-only to DefaultPackageTargets.
Libraries/src/Amazon.Lambda.SQSEvents/SQSBatchResponse.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.SQSEvents/Amazon.Lambda.SQSEvents.csproj Uses DefaultPackageTargets.
Libraries/src/Amazon.Lambda.SNSEvents/Amazon.Lambda.SNSEvents.csproj Uses DefaultPackageTargets.
Libraries/src/Amazon.Lambda.S3Events/S3ObjectLambdaEvent.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.S3Events/Amazon.Lambda.S3Events.csproj Uses DefaultPackageTargets and applies trimming settings unconditionally.
Libraries/src/Amazon.Lambda.RuntimeSupport/RuntimeSupportInitializer.cs Removes conditional attribute compilation.
Libraries/src/Amazon.Lambda.RuntimeSupport/Program.cs Removes #if wrappers; keeps resolving hook guarded by entrypoint mode.
Libraries/src/Amazon.Lambda.RuntimeSupport/Helpers/Utils.cs Removes old TFM branches and conditional trimming attributes.
Libraries/src/Amazon.Lambda.RuntimeSupport/Helpers/SnapstartHelperInitializeWithSnapstartIsolatedAsync.cs Removes #if wrapper around SnapStart helper.
Libraries/src/Amazon.Lambda.RuntimeSupport/Helpers/SnapstartHelperCopySnapshotCallbacksIsolated.cs Removes #if wrapper around SnapStart helper.
Libraries/src/Amazon.Lambda.RuntimeSupport/Helpers/Logging/MessageState.cs Removes #if wrapper around logging helper type.
Libraries/src/Amazon.Lambda.RuntimeSupport/Helpers/Logging/MessageProperty.cs Removes #if wrapper and minor cleanup.
Libraries/src/Amazon.Lambda.RuntimeSupport/Helpers/Logging/JsonLogMessageFormatter.cs Removes #if wrapper around formatter.
Libraries/src/Amazon.Lambda.RuntimeSupport/Helpers/Logging/ILogMessageFormatter.cs Removes #if wrapper around interface.
Libraries/src/Amazon.Lambda.RuntimeSupport/Helpers/Logging/DefaultLogMessageFormatter.cs Removes #if wrapper around formatter.
Libraries/src/Amazon.Lambda.RuntimeSupport/Helpers/Logging/AbstractLogMessageFormatter.cs Removes #if wrapper around base formatter.
Libraries/src/Amazon.Lambda.RuntimeSupport/ExceptionHandling/StackFrameInfo.cs Removes conditional trimming suppression wrapper.
Libraries/src/Amazon.Lambda.RuntimeSupport/Context/LambdaConsoleLogger.cs Removes #if wrappers around log-level APIs.
Libraries/src/Amazon.Lambda.RuntimeSupport/Context/LambdaBootstrapConfiguration.cs Removes old TFM branch for SnapStart init type.
Libraries/src/Amazon.Lambda.RuntimeSupport/Client/RuntimeApiClient.cs Removes now-unneeded conditional compilation; simplifies logger writer selection.
Libraries/src/Amazon.Lambda.RuntimeSupport/Client/IRuntimeApiClient.cs Removes conditional compilation around restore APIs.
Libraries/src/Amazon.Lambda.RuntimeSupport/Bootstrap/UserCodeValidator.cs Removes conditional compilation around trimming attribute.
Libraries/src/Amazon.Lambda.RuntimeSupport/Bootstrap/UserCodeLoader.cs Removes conditional compilation around trimming attribute.
Libraries/src/Amazon.Lambda.RuntimeSupport/Bootstrap/UserCodeInit.cs Removes old-TFM branches; adjusts trimming attributes.
Libraries/src/Amazon.Lambda.RuntimeSupport/Bootstrap/ResponseStreaming/ResponseStreamLambdaCoreInitializerIsolated.cs Removes #if wrapper.
Libraries/src/Amazon.Lambda.RuntimeSupport/Bootstrap/ResponseStreaming/ResponseStreamFactory.cs Removes old-TFM NotImplementedException branch.
Libraries/src/Amazon.Lambda.RuntimeSupport/Bootstrap/ResponseStreaming/ResponseStream.cs Makes dispose idempotent with interlocked flag.
Libraries/src/Amazon.Lambda.RuntimeSupport/Bootstrap/ResponseStreaming/RawStreamingHttpClient.cs Removes #if wrapper and unused using.
Libraries/src/Amazon.Lambda.RuntimeSupport/Bootstrap/LambdaBootstrapBuilder.cs Minor cleanup (this. removal).
Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj Drops older TFMs; makes trimming settings unconditional.
Libraries/src/Amazon.Lambda.PowerShellHost/Amazon.Lambda.PowerShellHost.csproj Uses DefaultPackageTargets and updates PS SDK/dependency versions by TFM.
Libraries/src/Amazon.Lambda.MQEvents/Amazon.Lambda.MQEvents.csproj Uses DefaultPackageTargets and makes trimming settings unconditional.
Libraries/src/Amazon.Lambda.Logging.AspNetCore/Amazon.Lambda.Logging.AspNetCore.csproj Uses DefaultPackageTargets.
Libraries/src/Amazon.Lambda.LexV2Events/Amazon.Lambda.LexV2Events.csproj Uses DefaultPackageTargets and makes trimming settings unconditional.
Libraries/src/Amazon.Lambda.LexEvents/LexActiveContext.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.LexEvents/Amazon.Lambda.LexEvents.csproj Uses DefaultPackageTargets and makes trimming settings unconditional.
Libraries/src/Amazon.Lambda.KinesisFirehoseEvents/KinesisFirehoseEvent.cs Removes conditional JSON attributes and minor cleanup.
Libraries/src/Amazon.Lambda.KinesisFirehoseEvents/Amazon.Lambda.KinesisFirehoseEvents.csproj Uses DefaultPackageTargets and makes trimming settings unconditional.
Libraries/src/Amazon.Lambda.KinesisEvents/StreamsEventResponse.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.KinesisEvents/Properties/AssemblyInfo.cs Removes CLSCompliant attribute.
Libraries/src/Amazon.Lambda.KinesisEvents/KinesisTimeWindowResponse.cs Removes conditional imports/attributes.
Libraries/src/Amazon.Lambda.KinesisEvents/KinesisTimeWindowEvent.cs Removes conditional imports/attributes.
Libraries/src/Amazon.Lambda.KinesisEvents/Converters/DictionaryLongToStringJsonConverter.cs Simplifies converter, removes old-TFM branches, adds docs.
Libraries/src/Amazon.Lambda.KinesisEvents/Amazon.Lambda.KinesisEvents.csproj Uses DefaultPackageTargets and makes trimming settings unconditional.
Libraries/src/Amazon.Lambda.KinesisAnalyticsEvents/KinesisAnalyticsStreamsInputPreprocessingEvent.cs Removes conditional JSON attributes and minor cleanup.
Libraries/src/Amazon.Lambda.KinesisAnalyticsEvents/KinesisAnalyticsOutputDeliveryResponse.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.KinesisAnalyticsEvents/KinesisAnalyticsOutputDeliveryEvent.cs Removes conditional JSON attributes and minor cleanup.
Libraries/src/Amazon.Lambda.KinesisAnalyticsEvents/KinesisAnalyticsInputPreprocessingResponse.cs Removes conditional JSON attributes and minor cleanup.
Libraries/src/Amazon.Lambda.KinesisAnalyticsEvents/KinesisAnalyticsFirehoseInputPreprocessingEvent.cs Removes conditional JSON attributes and minor cleanup.
Libraries/src/Amazon.Lambda.KinesisAnalyticsEvents/Amazon.Lambda.KinesisAnalyticsEvents.csproj Uses DefaultPackageTargets and makes trimming settings unconditional.
Libraries/src/Amazon.Lambda.KafkaEvents/Amazon.Lambda.KafkaEvents.csproj Uses DefaultPackageTargets and makes trimming settings unconditional.
Libraries/src/Amazon.Lambda.DynamoDBEvents/StreamsEventResponse.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.DynamoDBEvents/ExtensionMethods.cs Removes old-TFM JSON number write fallback.
Libraries/src/Amazon.Lambda.DynamoDBEvents/DynamoDBTimeWindowResponse.cs Removes conditional imports/attributes.
Libraries/src/Amazon.Lambda.DynamoDBEvents/DynamoDBTimeWindowEvent.cs Removes conditional imports/attributes.
Libraries/src/Amazon.Lambda.DynamoDBEvents/Converters/DictionaryLongToStringJsonConverter.cs Simplifies converter, removes old-TFM branches, adds docs.
Libraries/src/Amazon.Lambda.DynamoDBEvents/Amazon.Lambda.DynamoDBEvents.csproj Uses DefaultPackageTargets and makes trimming settings unconditional.
Libraries/src/Amazon.Lambda.DynamoDBEvents.SDK.Convertor/Amazon.Lambda.DynamoDBEvents.SDK.Convertor.csproj Uses DefaultPackageTargets.
Libraries/src/Amazon.Lambda.Core/SnapshotRestore.cs Formatting cleanup.
Libraries/src/Amazon.Lambda.Core/LambdaSerializerAttribute.cs Minor cleanup (this. removal).
Libraries/src/Amazon.Lambda.Core/LambdaLogger.cs Updates conditional compilation baseline for log-level APIs.
Libraries/src/Amazon.Lambda.Core/ILambdaLogger.cs Updates conditional compilation baseline for log-level APIs.
Libraries/src/Amazon.Lambda.Core/Amazon.Lambda.Core.csproj Keeps netstandard2.0 + uses DefaultPackageTargets; adjusts trimming condition.
Libraries/src/Amazon.Lambda.ConnectEvents/Amazon.Lambda.ConnectEvents.csproj Uses DefaultPackageTargets and makes trimming settings unconditional.
Libraries/src/Amazon.Lambda.ConfigEvents/Amazon.Lambda.ConfigEvents.csproj Uses DefaultPackageTargets and makes trimming settings unconditional.
Libraries/src/Amazon.Lambda.CognitoEvents/IdTokenGeneration.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CognitoEvents/GroupConfiguration.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CognitoEvents/CognitoVerifyAuthChallengeResponse.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CognitoEvents/CognitoVerifyAuthChallengeRequest.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CognitoEvents/CognitoTriggerRequest.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CognitoEvents/CognitoTriggerCallerContext.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CognitoEvents/CognitoPreTokenGenerationV2Response.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CognitoEvents/CognitoPreTokenGenerationV2Request.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CognitoEvents/CognitoPreTokenGenerationResponse.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CognitoEvents/CognitoPreTokenGenerationRequest.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CognitoEvents/CognitoPreSignupResponse.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CognitoEvents/CognitoPreSignupRequest.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CognitoEvents/CognitoPreAuthenticationRequest.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CognitoEvents/CognitoPostConfirmationRequest.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CognitoEvents/CognitoPostAuthenticationRequest.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CognitoEvents/CognitoMigrateUserRequest.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CognitoEvents/CognitoDefineAuthChallengeResponse.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CognitoEvents/CognitoDefineAuthChallengeRequest.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CognitoEvents/CognitoCustomSmsSenderRequest.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CognitoEvents/CognitoCustomMessageResponse.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CognitoEvents/CognitoCustomMessageRequest.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CognitoEvents/CognitoCustomEmailSenderRequest.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CognitoEvents/CognitoCreateAuthChallengeResponse.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CognitoEvents/CognitoCreateAuthChallengeRequest.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CognitoEvents/ClaimsAndScopeOverrideDetails.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CognitoEvents/ClaimOverrideDetails.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CognitoEvents/ChallengeResultElement.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CognitoEvents/Amazon.Lambda.CognitoEvents.csproj Uses DefaultPackageTargets and makes trimming settings unconditional.
Libraries/src/Amazon.Lambda.CognitoEvents/AccessTokenGeneration.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CloudWatchLogsEvents/CloudWatchLogsEvents.cs Removes conditional JSON attributes and minor cleanup.
Libraries/src/Amazon.Lambda.CloudWatchLogsEvents/Amazon.Lambda.CloudWatchLogsEvents.csproj Uses DefaultPackageTargets and makes trimming settings unconditional.
Libraries/src/Amazon.Lambda.CloudWatchEvents/TranslateEvents/TranslateParallelDataStateChange.cs Fixes XML doc comment formatting.
Libraries/src/Amazon.Lambda.CloudWatchEvents/S3Events/S3ObjectRestore.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CloudWatchEvents/S3Events/S3ObjectEventDetails.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CloudWatchEvents/S3Events/S3ObjectDelete.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CloudWatchEvents/S3Events/S3ObjectCreate.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CloudWatchEvents/S3Events/S3Object.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CloudWatchEvents/CloudWatchEvent.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.CloudWatchEvents/Amazon.Lambda.CloudWatchEvents.csproj Uses DefaultPackageTargets and makes trimming settings unconditional.
Libraries/src/Amazon.Lambda.AspNetCoreServer/Internal/Utilities.cs Uses newer certificate loader API for net10+.
Libraries/src/Amazon.Lambda.AspNetCoreServer/Internal/LambdaServer.cs Removes unused usings; suppresses CS1591 for internal surface.
Libraries/src/Amazon.Lambda.AspNetCoreServer/Internal/HttpRequestMessageConverter.cs Suppresses CS1591 for internal surface.
Libraries/src/Amazon.Lambda.AspNetCoreServer/Amazon.Lambda.AspNetCoreServer.csproj Uses DefaultPackageTargets and whitespace cleanup.
Libraries/src/Amazon.Lambda.AspNetCoreServer/APIGatewayProxyFunction.cs Adds pragma suppression around obsolete response body feature path.
Libraries/src/Amazon.Lambda.AspNetCoreServer/APIGatewayHttpApiV2ProxyFunction.cs Adds pragma suppression around obsolete response body feature path; removes #if around streaming prelude override.
Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/ServiceCollectionExtensions.cs Tightens serializer registration behavior and fixes doc references.
Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/HostingOptions.cs Makes serializer property nullable.
Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/Amazon.Lambda.AspNetCoreServer.Hosting.csproj Uses DefaultPackageTargets.
Libraries/src/Amazon.Lambda.ApplicationLoadBalancerEvents/ApplicationLoadBalancerResponse.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.ApplicationLoadBalancerEvents/Amazon.Lambda.ApplicationLoadBalancerEvents.csproj Uses DefaultPackageTargets and makes trimming settings unconditional.
Libraries/src/Amazon.Lambda.AppSyncEvents/Amazon.Lambda.AppSyncEvents.csproj Uses DefaultPackageTargets.
Libraries/src/Amazon.Lambda.Annotations/Amazon.Lambda.Annotations.csproj Updates TFMs while keeping netstandard2.0 for source generator support.
Libraries/src/Amazon.Lambda.Annotations/APIGateway/RestApiAuthorizerAttribute.cs Formatting cleanup.
Libraries/src/Amazon.Lambda.Annotations/APIGateway/HttpResults.cs Updates conditional compilation to exclude only netstandard2.0.
Libraries/src/Amazon.Lambda.Annotations/APIGateway/HttpApiAuthorizerAttribute.cs Formatting cleanup.
Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Templates/AuthorizerSetupParameters.tt Updates generated #if baseline to NET8+.
Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Templates/AuthorizerSetupParameters.cs Regenerates template output to NET8+ baseline.
Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Templates/APIGatewaySetupParameters.cs Regenerates template output to NET8+ baseline.
Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Generator.cs Updates runtime mapping/allowed values and default runtime.
Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Amazon.Lambda.Annotations.SourceGenerator.csproj Updates TFMs and packaging items to match.
Libraries/src/Amazon.Lambda.APIGatewayEvents/Amazon.Lambda.APIGatewayEvents.csproj Uses DefaultPackageTargets and removes netstandard-only define.
Libraries/src/Amazon.Lambda.APIGatewayEvents/APIGatewayProxyResponse.cs Makes JsonPropertyName attributes unconditional under new TFMs.
Libraries/src/Amazon.Lambda.APIGatewayEvents/APIGatewayCustomAuthorizerV2SimpleResponse.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.APIGatewayEvents/APIGatewayCustomAuthorizerV2IamResponse.cs Removes conditional JSON attributes.
Libraries/src/Amazon.Lambda.APIGatewayEvents/APIGatewayCustomAuthorizerResponse.cs Makes JsonPropertyName attributes unconditional under new TFMs.
Libraries/src/Amazon.Lambda.APIGatewayEvents/APIGatewayCustomAuthorizerContextOutput.cs Minor cleanup (this. removal).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread buildtools/common.props Outdated
Comment thread buildtools/common.props Outdated

<OutputType>Library</OutputType>
<NoWarn>$(NoWarn);CA1822</NoWarn>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed all compiler warnings and enabled treat warnings as errors in the common.props.

but here i see its still false. should be true

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha, I deleted the wrong line. Fixed it now.

@normj normj marked this pull request as ready for review April 24, 2026 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants